import datetime
import hashlib
import time
import uuid
from _md5 import md5


def generator_token():
    # stamp = datetime.datetime.timestamp()
    stamp = time.time()
    # print(type(stamp))
    sha1 = hashlib.md5(str(stamp).encode('utf-8'))
    result = sha1.hexdigest()
    # print(result)
    return result


# generator_token()


# def generator_token1():
#     uuid_n = uuid.uuid4()
#     print(uuid_n)
#     result = uuid_n.hex
#     print(result)
#
#
# generator_token1()
